How to add a subform to a form.





In the Form Design view, use the 'Subform/Subreport' button on the Toolbox. Click on the form to insert a subform and follow the steps for the wizard.

    1) If the Database window is not activated, activate the Database window.
    2) Choose the 'Forms' tab in the Database window.
    < Forms tab >
    3) Select the desired main form from the list box. (The selected form is highlighted.)
    NOTE: Before proceeding, the table relationships must be set correctly to link the subform to the main form.
    4) Choose the 'Design' button. (The selected form appears in Design view, and the floating Toolbox appears.)
    5) Do one of the following:

      a) To create a new subform to add to the main form, do the following:

        1] Choose the 'Subform/Subreport' button on the Toolbox.
        2] Position the mouse pointer on the form to select the location for the subform.
        3] Click the location for the subform on the form. (The Subform/Subreport Wizard appears.)
        4] Select the 'Table/Query' button to create a new subform.
        < Subform Wizard Step1 >
        5] Choose the 'Next' button. (The next step of the wizard appears.)
        6] Select the desired table or query from the 'Tables and Queries' drop-down list.
        NOTE: The table or query must have joining fields already established for linking.
        7] Select the desired field to appear on the form from the 'Available Fields' list box.
        8] Choose the ' > ' button to add the field to the 'Selected Fields' list box.
        9] Repeat steps 5)a)7] and 5)a)8] for each additional field to be added to the subform.
        NOTE: Choose the ' > > ' button to add all fields in the 'Available Fields' list at one time.
        10] Choose the 'Next' button. (The next step of the wizard appears.)
        11] Select the 'Choose from a list' button for linking the fields in the main form and subform.
        12] Select the desired linking fields from the 'Select one of these links' list box.
        < Subform Wizard Step2 >
        13] Choose the 'Next' button. (The next step of the wizard appears.)
        14] Enter the desired name for the subform.
        NOTE: This name will appear in the 'Forms' tab in the Database window.
        15] Choose the 'Finish' button. (The subform appears in Design view.)

      b) To add an existing form to the current main form, do the following:

        1] Choose the 'Subform/Subreport' button on the Toolbox.
        2] Position the mouse pointer on the form to select the location for the subform.
        3] Click on the location for the subform on the form. (The Subform/Subreport Wizard appears.)
        4] Select the 'Forms' button.
        5] Select the existing form name from the drop-down list.
        < Subform Wizard Step1 Existing >
        6] Choose the 'Next' button. (The next step of the wizard appears.)
        NOTE: An error message will appear if an incorrect form is selected.
        7] Select the 'Choose from a list' button for linking the fields in the main form and subform.
        8] Select the desired linking fields from the 'Select one of these links' list box.
        < Subform Wizard Step2 >
        9] Choose the 'Next' button. (The next step of the wizard appears.)
        10] Enter the desired name for the subform.
        NOTE: This name will appear in the 'Forms' tab in the Database window.
        11] Choose the 'Finish' button. (The subform appears in Design view.)
        12] Select the 'File' menu and select 'Save' to save the form.
        13] Select the 'View' menu and select 'Form'.

    6) Select the 'File' menu and select 'Save' to save the form.
    7) Select the 'View' menu and select 'Form'.


Knowledge-Pak Desktop Suite (TM) Edition 5
Copyright (c) 1994-1997 by ServiceWare Inc. Subject to the terms set forth in the end-user license agreement. All rights reserved.



2nd Opinion copyright © 1997 by McAfee Associates.
Subject to the terms set forth in the end-user license agreement. All rights reserved.